
package com.qianli.user.job;

import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import com.qianli.user.service.UserFrozenService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * name:解冻用户任务
 * auth:ting.li@yuntu-inc.com
 * date:2017/9/29下午4:49
 * version: v1.0.0
 **/
public class UnFrozenUserJOb implements SimpleJob{

    private static final Logger LOGGER = LoggerFactory.getLogger(UnFrozenUserJOb.class);

    @Autowired
    private UserFrozenService userFrozenService;
    @Override
    public void execute(ShardingContext shardingContext) {
        long startTime = System.currentTimeMillis();
        LOGGER.info("un frozen user job start...");
        userFrozenService.unFrozenUsers();
        LOGGER.info("un frozen user job end...,all cost:" + (System.currentTimeMillis()-startTime));

    }


}
